>> TGS_phase_analysis('Cr_single_crystal-2019-06-30-06.40um-5degrees#3-POS-1.txt','Cr_single_crystal-2019-06-30-06.40um-5degrees#3-NEG-1.txt',6.4,1)

f2 = 

     General model:
     f2(x) = A.*(erfc(q*sqrt(k*(x+start_time)))-beta*exp(-q^2*k*(x+start_time)
                    )./sqrt((x+start_time)))+B.*sin(2*pi*(peak_freq)*(x+
                    start_time)+p)*exp(-(x+start_time)/t)+D
     Coefficients (with 95% confidence bounds):
       A =     0.01771  (0.01702, 0.01839)
       k =   2.609e-05  (2.544e-05, 2.674e-05)
       beta =   6.111e-07  (-9.926e-07, 2.215e-06)
       B =    0.008649  (0.008535, 0.008763)
       p =      -2.812  (-2.822, -2.802)
       t =   2.634e-08  (2.581e-08, 2.686e-08)
       D =   0.0003478  (0.0003204, 0.0003752)
     Problem parameters:
       q =   9.817e+05
       start_time =       8e-10
       peak_freq =   5.503e+08

ans =

   5.5025e+08